
let a=location.search;

let oart=document.getElementsByClassName("datail-art")[0];
//$.ajax({
//type: "get",   
//url: "js/JSON.json",
//dataType: "json",
//success: function(data) {
//	console.log(data.PDT)
//	
//}
// }
let detaildata=ajax("get","js/JSON.json","");


detaildata.then((data)=>{
	
	let Data = JSON.parse(data).PDT;
	
	for(x in Data){
		
		
//		if(Data[x].ID==a) 
		
		
		if("?"+Data[x].ID==a){
//			console.log(Data[x])
			let oar=document.getElementsByClassName("datail-art")[0];
			let op=Data[x];
			oar.innerHTML=`
			     <div class="tupian">
					<img src="img/${op.img}" width="100%"/> 
					<p class="font">${op.Name}</p>
				    <a href="#">
				    	<button class="btn"></button>
				    </a>
					<article class="store">
						<h1>背景故事</h1>
						<p>${op.content}</p>
					</article>
					
				</div>
				
				
				
				<article class="howuse">
					<header>使用技巧</header>
					
					<article class="usethis">
						<header>当你使用这个英雄</header>
						<article>${op.play}</article>
					</article>
					
					<article class="usethis">
						<header>敌人使用这个英雄</header>
						<article>
							${op.compete}
						</article>
					</article>
			`;
		}
	}
	
})


